import request from '@/utils/request'

// 查询异常列表
export function listAbnormal(query) {
  return request({
    url: '/dgw/abnormal/list',
    method: 'get',
    params: query
  })
}

// 查询异常详细
export function getAbnormal(abnormalId) {
  return request({
    url: '/dgw/abnormal/' + abnormalId,
    method: 'get'
  })
}

// 新增异常
export function addAbnormal(data) {
  return request({
    url: '/dgw/abnormal',
    method: 'post',
    data: data
  })
}

// 修改异常
export function updateAbnormal(data) {
  return request({
    url: '/dgw/abnormal',
    method: 'put',
    data: data
  })
}

// 删除异常
export function delAbnormal(abnormalId) {
  return request({
    url: '/dgw/abnormal/' + abnormalId,
    method: 'delete'
  })
}

// 导出异常
export function exportAbnormal(query) {
  return request({
    url: '/dgw/abnormal/export',
    method: 'get',
    params: query
  })
}
